package pl.koziolekweb.translator.gui;

import pl.koziolekweb.translator.guiservices.MainFrameService;
import pl.koziolekweb.translator.utilites.Context;

/**
 * Basic implementation of {@link MainFrameService}
 * 
 * @author koziolek
 */

// Info: $Id$
public class MainFrameServiceImpl implements MainFrameService<Context> {

	private static final String NAME = "swing";

	/**
	 * Create new {@link MainFrame} and show it.
	 * 
	 * @throws Throwable
	 *             when any type of exception occures
	 */
	@Override
	public void init(final Context context) throws Throwable {
		MainFrame frame = new MainFrame(context);
		frame.setVisible(true);
	}

	@Override
	public String getServiceName() {
		return MainFrameServiceImpl.NAME;
	}
}
